<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/includes.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7"/>
<meta name="description" content="360应用—成语大全"/>
<meta name="keywords" content="360应用—成语大全,成语解释,成语出处,成语拼音"/>
<title>360应用—成语大全</title>
<link rel="stylesheet" type="text/css" href="<c:url value='/css/app/baidu/idiom/baidu.css'/>"/>
<link rel="stylesheet" type="text/css" href="<c:url value='/css/pagination.css'/>"/>
<script type="text/javascript" src="<c:url value='/js/jquery-1.4.2.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/jquery.pagination.js'/>"></script>
<script src="<c:url value='/js/jquery.form.js'/>" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	InitData(0);
	initPage();
});

function submit(){
	InitData(0);
	initPage();
}

function initPage(){
	$("#form1").ajaxSubmit({
		url:"<c:url value='/appin/queryIdiomCount'/>",
		dataType:"json",
		success:function(data){
			$("#Pagination").pagination(data, {
				callback: pageselectCallback,
				prev_text: '< 上一页',
				next_text: '下一页 >',
				items_per_page: 8,
				num_display_entries: 6,
				current_page: 0,
				num_edge_entries: 2
			});
		}
	});
}

function InitData(pageIndex) {
	$("#page").val(pageIndex);
	$("#form1").ajaxSubmit({
		url:"<c:url value='/appin/queryIdiom'/>",
		dataType:"json",
		success:function(data){
			var trs = "";
			$.each(data, function(i, n) {
				if(i % 2 == 0){
					trs += "<li><span style='width:500px' class='link-bluebg'><a href='<c:url value='/app/getIdiomItem/qihoo/"+n.code+"'/>' class='a2'>"+n.name+"</a></span> </li>";
				}else{
					trs += "<li><span style='width:500px' class='link-nobg'><a href='<c:url value='/app/getIdiomItem/qihoo/"+n.code+"'/>' class='a2'>"+n.name+"</a></span> </li>";
				}
			});
			$("#idioms").empty().append(trs);
		}
	});
}

function pageselectCallback(page_id, jq) {
	InitData(page_id);
}
</script>
</head>
<body>
<div class="divbg-small" id="divbgs">
<div class="divcontentbg">
  <div class="c_round_gray">
    <b class="xtop"><b class="xb1b"></b><b class="xb2b"></b><b class="xb3b"></b><b class="xb4b"></b></b>
    <div class="xboxcontent_b">
      <div class="searchborder-new" id="searchborder" style="width:506px;">
        <form:form commandName="idiomForm" id="form1">
        <div class="divsearch-new" id="divsearch">
          <div class="kd-select">
          <form:select path="queryCondition">
          	<form:option value="name">成语</form:option>
          	<form:option value="spinyin">拼音简称</form:option>
          	<!-- option value="chuchu">出处</option> -->
          </form:select>
          </div>
          <form:input path="queryInfo" cssStyle="font-size: 12px;" cssClass="input3"/>
          <form:hidden path="page"/>
          <a href="#" class="searchbutton" onclick="submit();return false;" onfocus="this.blur();" id="lika">查询</a>
        </div>
        </form:form>
        <div style="text-align:right;"><a href="<c:url value='/app/idiom.nhtml?type=qihoo'/>">返回</a></div>
        <div class="clear"></div>
      </div>
      <div style="display: block;" class="divlist-new" id="index">
        <div class="clear"></div>
        <div class="public-new">
          <ul style="width:506px" id="idioms"></ul>
        </div>
         <div class="divpaging fr" id="fenye"><div class="Pagination" id="Pagination"></div></div>
        <div class="clear"></div>
      </div>
    </div>
    <b class="xbottom"><b class="xb4b"></b><b class="xb3b"></b><b class="xb2b"></b><b class="xb1b"></b></b>
  </div>
  <div class="kd-bottom">Powered by <a href="http://www.seemsea.com" target="_blank" title="Powered by Seemsea">Seemsea.com</a></div>
</div>
</div>
<div style="display:none"><script src="http://s22.cnzz.com/stat.php?id=3134925&web_id=3134925" type="text/javascript"></script></div>
</body></html>